/**
 * Copyright (c) 2020 Coder League
 * All rights reserved.
 *
 * File：SystemConfigDaoImpl.java
 * History:
 *         2020年12月19日: Initially created, Chrise.
 */
package club.coderleague.cfss.dao.impl;

import club.coderleague.cfss.dao.extension.SystemConfigDaoExtension;
import club.coderleague.cfss.domain.beans.SystemConfig;
import club.coderleague.cfss.domain.entities.Systemconfigs;
import club.coderleague.cfss.domain.enums.EntityState;
import club.coderleague.data.jpa.id.support.SnowflakeV4;
import club.coderleague.data.jpa.repository.support.AbstractDataRepositoryExtension;

/**
 * 系统配置数据访问对象实现。
 * @author Chrise
 */
public class SystemConfigDaoImpl extends AbstractDataRepositoryExtension<Systemconfigs, Long, SnowflakeV4> implements SystemConfigDaoExtension {
	/**
	 * @see club.coderleague.cfss.dao.extension.SystemConfigDaoExtension#queryCacheBean()
	 */
	@Override
	public SystemConfig queryCacheBean() {
		String sql = "select vercodetimeout, wxappid, wxappkey, wxvertoken, wxwelcome, ayappid, ayappkey, aysign " 
			+ "from Systemconfigs where entitystate = ?0";
		return super.queryCustomBeanBySql(SystemConfig.class, sql, EntityState.VALID.getValue());
	}
}
